﻿@model IEnumerable<DenderaMvcWeb.Models.filato>

@{
    ViewBag.Title = "Elenco dei filati";
}

<h2>@{
    ViewBag.Title = "Elenco dei filati";
}</h2>

<p>
   @* @Html.ActionLink("Crea nuovo", "Create")*@
   <img src="../../Images/add.png" alt="nuovo" class="buttonsImage" />
   <a href="@Url.Action("Create", "Filato")">  Crea nuovo 
   </a>
</p>

@* vedi documentazione x filtro
http://www.asp.net/mvc/tutorials/mvc-4/getting-started-with-aspnet-mvc4/examining-the-edit-methods-and-edit-view*@

@using (Html.BeginForm("Index", "Filato", FormMethod.Get)){   
         <p>
        @* Genre: @Html.DropDownList("ragione_soc", , "All")*@
         Label: @Html.TextBox("label")
         <input type="submit" value="cerca" />
         </p> 
        }


<table>
    <tr>
       @* <th>
            @Html.DisplayNameFor(model => model.id_filato)
        </th>*@
        <th>
            @Html.DisplayNameFor(model => model.label)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.denari)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.costo)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.caratteristiche)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.note)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.costo_aggiornato_al)
        </th>
       @* <th>
            @Html.DisplayNameFor(model => model.ultima_modifica)
        </th>*@
        <th>
            @Html.DisplayNameFor(model => model.anagrafica.ragione_soc)           
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        @*<td>
            @Html.DisplayFor(modelItem => item.id_filato)
        </td>*@
        <td>
            @Html.DisplayFor(modelItem => item.label)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.denari)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.costo)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.caratteristiche)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.note)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.costo_aggiornato_al)
        </td>
       @* <td>
            @Html.DisplayFor(modelItem => item.ultima_modifica)
        </td>*@
        <td>
            @Html.DisplayFor(modelItem => item.anagrafica.ragione_soc)
        </td>
        <td>
         @*   @Html.ActionLink("Modifica", "Edit", new {  id=item.id_filato }) |
            @Html.ActionLink("Vedi", "Details", new {  id=item.id_filato }) |*@
        
         @*   @Html.ActionLink("Elimina", "Delete", new { id = item.id_filato }) *@
          @*  @Html.ActionLink(" b ", "Delete", new { id = item.id_filato }, new { @class = "delete", @id="del"})  *@         
            
           <a href="@Url.Action("Edit", "Filato", new { id = item.id_filato })">
           <img src="../../Images/modif.png" alt="modifica" class="buttonsImage" /></a>

           <a href="@Url.Action("Details", "Filato", new { id = item.id_filato })">
           <img src="../../Images/detail.png" alt="dettaglio" class="buttonsImage" /></a>
          
           <a href="@Url.Action("Delete", "Filato", new { id = item.id_filato })">
           <img src="../../Images/cestino.gif" alt="delete" class="buttonsImage" /></a>
        
        </td>
    </tr>
}

</table>
